/******************************************************************************************
 * Import
 ******************************************************************************************/

// module
import React, {Component} from 'react';
import {View, TextInput} from 'react-native';

// project
import {
    Page, Content, Text, Image, Row, Header, Footer, Hand
} from '../../../../library'

/******************************************************************************************
 * Export Class
 ******************************************************************************************/

export default class Cash extends Component {

    /*------------------------------------------------------------------------------------
	 * 初始化
	 *-----------------------------------------------------------------------------------*/
	constructor(props) {
        super(props);
        
        /**
         * state
         */
		this.state = {
            // 房屋号
			list:[
                {floor:10,room:1},
                {floor:10,room:2},
                {floor:10,room:3},
                {floor:10,room:4},
                {floor:10,room:5},
                {floor:10,room:6},
                {floor:10,room:7},
                {floor:10,room:8},
                {floor:10,room:9},
                {floor:10,room:10},
                {floor:10,room:11},
                {floor:10,room:12},
                {floor:10,room:13},
                {floor:10,room:14},
                {floor:10,room:15},
                {floor:10,room:16},
                {floor:10,room:17},
                {floor:10,room:18},
                {floor:10,room:19},
                {floor:10,room:20},
                {floor:10,room:21},
                {floor:10,room:22},
                {floor:10,room:23},
            ]
		};
    }
    
    /*------------------------------------------------------------------------------------
	 * 渲染
	 *-----------------------------------------------------------------------------------*/
	render() {
		return (
			<Page>

                {/* 内容部分 */}
                <View style={{marginTop:40,backgroundColor:'#efeff4',height:45}}>
                    {/* 搜索框 */}
                    <Row pa='8 10' ma='8 10' bg='#fff' ra='5' x='center' y='center'>
                        <Image df source={require('../../../../assets/u1844.png')} w='14' h='14' mr='6'></Image>
                        <Hand f='1'>
                            <TextInput placeholder='搜索' placeholderTextColor='#bfbfbf' multiline = {true} underlineColorAndroid='transparent' style={{height:30,padding:0,flex:1}} />
                        </Hand>
                    </Row>

                </View>

				<Content mb='40' bg='#fff' >
                    {/* 数据列表 */}
                    <View style={{padding:15,paddingTop:0}}>
                        {this.state.list.map(item=>{
                            return (
                                <Text key={item.room} h='40' lh='40' bb='1 #f0f0f0'>{item.room}室</Text>
                            )
                        })}
                    </View>

				</Content>
				
                {/* 头部 */}
				<Header bg='#fff' h='40'></Header>

				{/* 底部 */}
				<Footer bg='#fff' h='40'> </Footer>
                
			</Page>
		);
	}
}
